<template>
	<view class="container">
		<view class="prompt">
			<image src="https://fine-yahe.oss-cn-shanghai.aliyuncs.com/app/empty/success.png" mode="scaleToFill" class="img"></image>
			<view class="title">认证成功</view>
		</view>
		<!-- <view class="text" v-if="data.status !== 'Rejected'">
			{{ statusCode[data.status].text }}
		</view> -->
		<view class="text">恭喜你，完成了身份验证</view>
		<view class="footer">
			<!-- <button class="btn" v-if="data.status !== 'Rejected'" open-type="contact">联系客服</button> -->
			<button class="btn" :disabled="!(time == 0)" @click="backTo">返回{{time != 0 ? `${(time)}s` : ''}}</button>
			<!-- <button class="btn2"  @click="onPay">付款</button> -->
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			data: {},
			type: null,
			statusCode: {
				Pending: { title: '提交成功', text: '平台预计在2个工作日内审核，请耐心等候您也可以主动联系牙荷客服' },
				Approved: { title: '审核通过', text: '您的资料已审核通过，牙荷客服将会与您取得联系 您也可以主动联系牙荷客服' },
				Rejected: { title: '审核不通过', text: '平台预计在2个工作日内审核，请耐心等候您也可以主动联系牙荷客服' }
			},
			time: 10
		};
	},
	onShow(option) {
		clearInterval(timer);
		let timer;
		timer = setInterval(() => {
			if (this.time == 0) {
				// this.time = 10;
				clearInterval(timer);
				return;
			}
			this.time--;
		}, 1000);
	},
	methods: {
		backTo() {
			uni.navigateBack({ delta: 2 });
		}
	}
};
</script>

<style scoped lang="less">
.container {
	display: flex;
	justify-content: center;
	flex-direction: column;
	align-items: center;
	font-family: HarmonyOS Sans SC, HarmonyOS Sans SC;
	height: 800rpx;
	gap: 40rpx;
	padding: 40rpx;
	.prompt {
		display: flex;
		flex-direction: column;
		gap: 40rpx;
		align-items: center;
		margin-bottom: 40rpx;
		.img {
			width: 148rpx;
			height: 148rpx;
		}
		.title {
			font-weight: 500;
			font-size: 40rpx;
			color: #3a3a3a;
		}
	}
	.text {
		// font-weight: 500;
		font-size: 32rpx;
		color: #3a3a3a;
		margin-bottom: 40rpx;
	}
	.footer {
		width: 100%;
		display: flex;
		justify-content: center;
		.btn {
			width: 90%;
			height: 80rpx;
			background: linear-gradient(90deg, #29d8c6 0%, #10beaf 100%);
			border-radius: 76rpx 76rpx 76rpx 76rpx;
			color: white;
			line-height: 80rpx;
			font-weight: 500;
			font-size: 30rpx;
			color: #ffffff;
		}
		.btn2 {
			width: 236rpx;
			height: 74rpx;
			border-radius: 76rpx 76rpx 76rpx 76rpx;
			border: 2rpx solid #10beaf;
			line-height: 74rpx;
			font-size: 28rpx;
			color: #10beaf;
			font-weight: 500;
			margin-top: 20rpx;
		}
	}
}
</style>
